package com.example.qincetest.network

import com.example.qincetest.network.beans.ApiListResponse
import com.example.qincetest.network.beans.WanAndroidBean
import kotlinx.coroutines.flow.Flow
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Path

interface NetApi {
    /**
     * 获取首页文章数据
     */
    @GET("article/list/{page}/json")
    suspend fun getArticleList(@Path("page") pageNo: Int): ApiCodeResponse<ApiListResponse<WanAndroidBean>>

    @GET("article/list/{page}/json")
    suspend fun getArticleList2(@Path("page") pageNo: Int): Response<ApiCodeResponse<ApiListResponse<WanAndroidBean>>>

//    @GET("article/list/{page}/json")
//    fun getArticleList1(@Path("page") pageNo: Int): Flow<ApiListResponse<WanAndroidBean>>
}